-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: slashing commands #205
base: master
Are you sure you want to change the base?
Conversation
e957e15
to
22e2a6a
Compare
operatorAddress: gethcommon.HexToAddress(operatorAddress), | ||
signerConfig: signerConfig, | ||
delegationManagerAddress: gethcommon.HexToAddress(delegationManagerAddress), | ||
allocationDelay: uint32(allocationDelayInt), |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.Atoi
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 27 days ago
To fix the problem, we need to ensure that the integer value parsed from the string is within the bounds of uint32
before performing the conversion. This can be done by using strconv.ParseUint
with a specified bit size of 32, which directly parses the string into a uint32
value, or by manually checking the bounds after parsing with strconv.Atoi
.
The best way to fix this without changing existing functionality is to use strconv.ParseUint
with a bit size of 32. This ensures that the parsed value is within the bounds of uint32
and avoids the need for additional bounds checking.
-
Copy modified line R160 -
Copy modified line R162 -
Copy modified line R205
@@ -159,5 +159,5 @@ | ||
allocationDelayString := c.Args().First() | ||
allocationDelayInt, err := strconv.Atoi(allocationDelayString) | ||
allocationDelayUint, err := strconv.ParseUint(allocationDelayString, 10, 32) | ||
if err != nil { | ||
return nil, eigenSdkUtils.WrapError("failed to convert allocation delay to int", err) | ||
return nil, eigenSdkUtils.WrapError("failed to convert allocation delay to uint32", err) | ||
} | ||
@@ -204,3 +204,3 @@ | ||
delegationManagerAddress: gethcommon.HexToAddress(delegationManagerAddress), | ||
allocationDelay: uint32(allocationDelayInt), | ||
allocationDelay: uint32(allocationDelayUint), | ||
}, nil |
c9de4de
to
dd1bfee
Compare
dd1bfee
to
a839dc5
Compare
6483945
to
70809f1
Compare
feat: add working cmds remove unrelated changes remove unrelated changes unsigned tx add some tests comment add readme more allocations basic show command update with latest contracts add more code add more code working slashing %age and comments update with latest contracts Update show.go (#226) updated to latest AM updated to latest AM updated to latest AM
70809f1
to
3839e40
Compare
Fixes # .
What Changed?